'use strict';
const path = require('path');
const url = require('./url');

module.exports = appInfo => {
    return {
        keys: '00e0ad137f6b4152893267ffa688e094',
        title: '食艺道',
        middleware: ['auth', 'errorHandler'],
        url: url,
        development: {
            ignoreDirs: [],
            fastReady: true,
        },
        view: {
            defaultViewEngine: 'nunjucks'
        },
        auth: {
            match: '/member/**'    //这里配置需要登录验证的页面
        },
        i18n:{
            defaultLocale: 'zh-CN',
        },
        static: {
            prefix: '/static/'
        },
        security: {
            csrf: {
                enable: false
            }
        },
        redis :{
            client: {
                host: '118.178.125.175',
                db: 1,
                port: 6379,
                password: ''
            }
        },
        session: {
            maxAge: 24 * 3600 * 1000, // ms
            key: 'O2O_SESS', // 承载 session 的 cookie 键值对名字
            httpOnly: true,
            encrypt: true
        },
        // notfound: {
        //     pageUrl: '/404.html',
        // },
    }
};
